//引入请求组件
import http from "../utils/http2.js"

//根据父id查询字典
export function queryDictChild(pid) {
  return http.get("/api/dict/child/" + pid, {});
}

//保存字典
export function saveDict(data) {
  return http.post("/api/dict", data);
}

//修改字典
export function updateDict(data) {
  return http.put("/api/dict", data);
}

//删除字典
export function deleteDict(id) {
  return http.delete("/api/dict/" + id, {});
}

// //删除类别
// // eslint-disable-next-line no-unused-vars
// export function deleteType(id) {
//   return http.post("/api/dict/type", id);
// }
